package com.wl.dzt.sys.ui.ext.view;

import com.wl.dzt.sys.controller.result.ActionResult;
import com.wl.dzt.sys.controller.view.View;
import com.wl.dzt.sys.util.WebUtils;
import com.wl.dzt.sys.util.json.Json;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author wl_code@163.com
 * @date 2018/7/5/005
 * @version 1.0
 * @description ext树形视图
 *
 */
@Component
public class ExtTreeView implements View {

    /**
     * <b>输出树形数据</b>

     *
     * @param actionResult
     * @param response
     * @param request
     * @return
     */
    public String doView(ActionResult actionResult, HttpServletResponse response, HttpServletRequest request) {
        WebUtils.print(Json.parse(actionResult.getTreeData()), response);
        return null;
    }
}
